﻿/***********************************************************************
 * <copyright file="InventoryItemEntity.cs" company="BUCA JSC">
 * -->    Copyright (C) statement. All right reserved
 * </copyright>
 * 
 * Created:   ThangNK
 * Email:    thangnk@buca.vn
 * Website:
 * Create Date: Thursday, March 13, 2014
 * Usage: 
 * 
 * RevisionHistory: 
 * Date         Author               Description 
 * 
 * ************************************************************************/


using BusinessObjects.BusinessRules;

namespace BusinessObjects.BussinessDictionary
{
    /// <summary>
    /// Class InventoryItemEntity.
    /// </summary>
    public class InventoryItem : BusinessObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="InventoryItemEntity"/> class.
        /// </summary>
        public InventoryItem()
        {
            AddRule(new ValidateId("InventoryItemId"));
        }


        /// <summary>
        /// Initializes a new instance of the <see cref="InventoryItem"/> class.
        /// </summary>
        /// <param name="inventoryItemId">The inventory item identifier.</param>
        /// <param name="inventoryItemCode">The inventory item code.</param>
        /// <param name="inventoryItemName">Name of the inventory item.</param>
        /// <param name="unitId">The unit identifier.</param>
        /// <param name="accountCode">The account code.</param>
        /// <param name="unit">The unit.</param>
        /// <param name="isActive">if set to <c>true</c> [is active].</param>
        public InventoryItem(long inventoryItemId, string inventoryItemCode, string inventoryItemName, long unitId, string accountCode, string unit, bool isActive)
            : this()
        {
            InventoryItemId = inventoryItemId;
            InventoryItemCode = inventoryItemCode;
            InventoryItemName = inventoryItemName;
            AccountCode = accountCode;
            Unit = unit;
            IsActive = isActive;
            UnitId = unitId;
        }

        /// <summary>
        /// Gets or sets the inventory item identifier.
        /// </summary>
        /// <value>The inventory item identifier.</value>
        public long InventoryItemId { get; set; }

        /// <summary>
        /// Gets or sets the inventory item code.
        /// </summary>
        /// <value>The inventory item code.</value>
        public string InventoryItemCode { get; set; }

        /// <summary>
        /// Gets or sets the name of the inventory item.
        /// </summary>
        /// <value>The name of the inventory item.</value>
        public string InventoryItemName { get; set; }

        /// <summary>
        /// Gets or sets the account code.
        /// </summary>
        /// <value>The account code.</value>
        public string AccountCode { get; set; }

        /// <summary>
        /// Gets or sets the unit.
        /// </summary>
        /// <value>The unit.</value>
        public string Unit { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this instance is active.
        /// </summary>
        /// <value><c>true</c> if this instance is active; otherwise, <c>false</c>.</value>
        public bool IsActive { get; set; }

        /// <summary>
        /// Gets or sets the unit identifier.
        /// </summary>
        /// <value>
        /// The unit identifier.
        /// </value>
        public long UnitId { get; set; } 
    }
}
